package xyz.hubery;

import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLEncoder;
import java.net.UnknownHostException;
import java.util.List;
import java.util.Map;

@SpringBootTest
public class Tools {

    @Test
    public void updatePassword() {
        BCryptPasswordEncoder passwordEncoder = new BCryptPasswordEncoder();
        String encode = passwordEncoder.encode("12345678a");
        System.out.println(encode);
        System.out.println(passwordEncoder.matches("18750957317aA","$2a$10$h.xzOrbaowtXPHw1msEQQ.qVzULiLcFGuGSEwH9799CpDzeF5QUfW"));
    }
}